package com.hszn.tzsb.bigscreen.controller;


import com.hszn.tzsb.bigscreen.mapper.DeptStatisticsMapper;
import com.hszn.tzsb.bigscreen.mapper.InformationStatisticsMapper;
import com.hszn.tzsb.bigscreen.model.AjaxResult;
import com.hszn.tzsb.bigscreen.model.DeptStatistics;
import com.hszn.tzsb.bigscreen.model.InformationStatistics;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

import static com.hszn.tzsb.bigscreen.model.AjaxResult.success;

/**
 * 数据统计Controller
 *
 * @author Song
 * @date 2025-04-18
 */
@RestController
@RequestMapping("/platform/statistics")
public class InformationStatisticsController
{
    @Autowired
    private InformationStatisticsMapper informationStatisticsMapper;
    @Autowired
    private DeptStatisticsMapper deptStatisticsMapper;
    /**
     * 查询数据统计列表
     */
    @GetMapping("bigscreen")
    public AjaxResult list(InformationStatistics informationStatistics)
    {
        List<InformationStatistics> list = informationStatisticsMapper.selectInformationStatisticsList(informationStatistics);
        return success(list);
    }

    @GetMapping("bigscreen/mappoint")
    public AjaxResult list(DeptStatistics deptStatistics)
    {
        List<DeptStatistics> list = deptStatisticsMapper.selectDeptStatisticsList(deptStatistics);
        return success(list);
    }

}
